package com.iplant.ams.service.po.ams;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

import java.io.Serializable;

@DBBasePO(TableName = "ams_purchase_request_item", CheckName = {"Code"}, CodeAuto = true, CodePrefix = "PRITM_{yyyyMMdd}", CodeNum = 6)
public class AMSPurchaseRequestItem extends BasePO implements Serializable {

    /**
     * 序列号
     */
    private static final long serialVersionUID = 1L;

    /**
     * 申请单ID
     */
    @DBField
    @DBCondition(ParamName = "RequestID", CompareType = DBCondition.DBCompareType.eq, MustCondition = true)
    public int RequestID = 0;

    /**
     * 资产标准型号ID
     */
    @DBField
    @DBCondition
    public int AssetStandardModelID = 0;

    /**
     * 资产名称
     */

    @DBJoin(name = "Name", tableName = "ams_asset_standard_model", tableAsName = "t1", ConditionalJoin = {" t1.ID=t.AssetStandardModelID"})
    public String AssetName = "";

    /**
     * 资产型号
     */
    @DBJoin(name = "AssetModel", tableName = "ams_asset_standard_model", tableAsName = "t1")
    public String AssetModel = "";

    /**
     * 计量单位
     */
    @DBJoin(name = "AssetUnit", tableName = "ams_asset_standard_model", tableAsName = "t1")
    public String AssetUnit = "";

    /**
     * 采购申请中的数量
     */
    @DBField
    public int RequestQuantity = 0;

    /**
     * 当前到货状态
     */
    @DBField
    public int CurrentStatus = 0;

    /**
     * 采购数量
     */
    @DBField
    public int PurchaseQuantity = 0;

    /**
     * 单条采购申请物品
     */
    public AMSPurchaseRequestItem() {
        super();
    }

    @JsonProperty("AssetStandardModelID")
    public int getAssetStandardModelID() {
        return AssetStandardModelID;
    }

    public void setAssetStandardModelID(int assetStandardModelID) {
        AssetStandardModelID = assetStandardModelID;
    }

    @JsonProperty("RequestQuantity")
    public int getRequestQuantity() {
        return RequestQuantity;
    }

    public void setRequestQuantity(int requestQuantity) {
        RequestQuantity = requestQuantity;
    }

    @JsonProperty("RequestID")
    public int getRequestID() {
        return RequestID;
    }

    public void setRequestID(int requestID) {
        RequestID = requestID;
    }

    @JsonProperty("AssetName")
    public String getAssetName() {
        return AssetName;
    }

    public void setAssetName(String assetName) {
        AssetName = assetName;
    }

    @JsonProperty("AssetModel")
    public String getAssetModel() {
        return AssetModel;
    }

    public void setAssetModel(String assetModel) {
        AssetModel = assetModel;
    }

    @JsonProperty("AssetUnit")
    public String getAssetUnit() {
        return AssetUnit;
    }

    public void setAssetUnit(String assetUnit) {
        AssetUnit = assetUnit;
    }

    @JsonProperty("CurrentStatus")
    public int getCurrentStatus() {
        return CurrentStatus;
    }

    public void setCurrentStatus(int currentStatus) {
        CurrentStatus = currentStatus;
    }

    @JsonProperty("ReceivedQuantity")
    public int getPurchaseQuantity() {
        return PurchaseQuantity;
    }

    public void setPurchaseQuantity(int purchaseQuantity) {
        PurchaseQuantity = purchaseQuantity;
    }
}
